package hn.sigit.model.hnd.administrative;

import java.io.Serializable;
import javax.persistence.*;

import hn.sigit.model.hnd.administrative.HND_UserRoleType;
import hn.sigit.model.hnd.administrative.HND_User;


@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="HND_UserRole", schema="hnd_administrative")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class HND_UserRole implements Serializable {
	private static final long serialVersionUID = 1L;

	public HND_UserRole() {
	}
	
	private long userroleID;
	public HND_User user;
	private HND_UserRoleType role;
	

	@Id
	@Column(name="ID", nullable=false)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="hnd_userrole_id_gen")
	@SequenceGenerator(name="hnd_userrole_id_gen", sequenceName="hnd_userrole_id_seq", allocationSize=1)
	public long getUserroleID() {
		return userroleID;
	}
	public void setUserroleID(long value) {
		this.userroleID = value;
	}
	
	@Column(name="Role", nullable=true)
	@Enumerated(EnumType.STRING)
	public HND_UserRoleType getRole() {
		return role;
	}
	public void setRole(HND_UserRoleType value) {
		this.role = value;
	}
	
	
	public String toString() {
		return String.valueOf(getUserroleID());
	}
	
}
